package ua.org.enginer.maps
{
	import mx.controls.ToggleButtonBar;
	
	public class TypeControl extends ToggleButtonBar
	{
		
		
		public function TypeControl()
		{
			super();
			dataProvider = [{label:"схема", data:"map"}, {label:"спутник", data:"sat"}, {label:"гибрид", data:"hybrid"}]
			setStyle("top", 10)
			setStyle("right", 10)
			
			//selectedIndex = 0
		}
		
		public function set selectedType(value:String):void {
			for(var i:int=0; i<dataProvider.length; i++)
				if (dataProvider[i].data == value) {
					selectedIndex = i
					return
				}
			selectedIndex = -1
		}
	}
}